/**
 * 卸载业务 api
 * Created by wmm on 2018/2/28.
 */
import { Injectable } from '@angular/core';
import { HttpParams } from '@angular/common/http';

import { HttpUtil } from '../HttpUtil';

@Injectable()
export class UnloadApi{

  constructor (public httpUtil: HttpUtil){
  }

  /**
   * 扫描容器
   */
  ScanContainer(qrcode:string,planPositionId:string,planId:string){
    const params = new HttpParams().set("token",localStorage.getItem("token")).set("qrcode",qrcode).set("planpositionId",planPositionId).set("planId",planId);
    return this.httpUtil.get("/api/Unload/ScanContainer",params);
  }
  /**
   * 扫描物料
   */
  ScanMateriel(qrcode:string,planPositionId:string,planId:string,containerId:string,projectId:string){
    const params = new HttpParams().set("token",localStorage.getItem("token")).set("qrcode",qrcode).set("planpositionId",planPositionId).set("planId",planId).set("containerId",containerId).set("projectId",projectId);
    return this.httpUtil.get("/api/Unload/ScanMateriel",params);
  }
  /**
   * 一键卸货
   */
  UnloadMaterielAll(planId:string,containerId:string,planPositionId:string){
    const params = new HttpParams().set("token",localStorage.getItem("token")).set("planId",planId).set("containerId",containerId).set("planpositionId",planPositionId);
    return this.httpUtil.get("/api/Unload/UnloadMaterielAll",params);
  }
  /**
   * 选择容器

  ChoseContainers(){
    const params = new HttpParams().set("token",localStorage.getItem("token"));
    return this.httpUtil.get("/api/Unload/ChoseContainers",params);
  }
   */
}
